//
//  BNBaseCollectionListView.h
//  BNCodeGuide
//
//  Created by Mac on 2021/5/22.
//  Copyright © 2021 kevin007. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN
@class BNBaseCollectionListView;

@protocol BNBaseCollectionListDelegate <NSObject>
 @optional
- (void)collectionListView:(BNBaseCollectionListView *)listView didSelectItemAtIndexPath:(NSIndexPath *)indexPath;
@end

@interface BNBaseCollectionListView : UIView<UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout>
/** collection view*/
@property (nonatomic, strong) UICollectionView *collectionView;
/** flow layout*/
@property (nonatomic, strong) UICollectionViewFlowLayout *flowLayout;
/** dataSource*/
@property (nonatomic, strong) NSArray *dataSource;


/** delegate*/
@property (nonatomic, weak) id<BNBaseCollectionListDelegate>delegate;

/** Select item at indexPath action handler*/
@property(nonatomic, copy) void(^didSelectItemAtIndexPathHandler)(NSIndexPath *indexPath);

#pragma mark - RefreshUI
- (void)refreshUI;
@end

NS_ASSUME_NONNULL_END
